The present invention relates generally to an automatic computer code generation tool, and more particularly to a graphics system and method for generation of code in the Ada language. The system is called the Avionics Program Expert (APEX) code generation system.
Graphical programming is a method of producing software in which the programmer employees a graphical notation to flowchart the logic. Once the graphical description of the program has been defined, it is possible to generate source code from this description. The direct result of graphical programming is that the user is able to design an application at a higher level of abstraction than is possible with a normal text editor. This technique can lead to several important advantages over traditional programming methods; some of these include:
Rapid Implementation of Design Changes PA1 Reduction of Source Code Syntax Errors PA1 Ability to Rapidly Prototype a Design PA1 Automated Documentation Production
Another area where graphical programming is useful is in software reuse. The concept of reusing software is not new; to date however, there have been few practical software libraries. One explanation for this is that the code contained in these libraries has been fully developed and the source files exist in text form (which is hard for programmers to quickly comprehend). The programmer who tries to reuse existing software is faced with a number of non-trivial tasks: defining what he is looking for, finding what he is looking for, understanding what he finds, and modifying it for his specific needs. With a graphical representation of existing code, the tasks of understanding what he finds and modifying it will be eased since both tasks can be done at a higher level of abstraction. Although this doesn't solve the whole problem, the combination of these factors illustrates how graphical programming can potentially increase programmer productivity.
Currently, a number of Ada code generation tools exist. These include Teamwork Ada by Cadre Technologies, Autocode by Integrated Systems, Inc., and Adagraph by the Analytical Sciences Corp (TASC). Some of these tools (like APEX) support the generation of Ada code from a graphical representation. Despite this, these tools suffer from a number of limitations.
An example of a design methodology is outlined in the book "System Design with Ada" by R.J.A. Buhr. The Buhr diagram methodology has been implemented by several popular tools (including Teamwork Ada by Cadre Technologies). However, many users of this methodology agree that it is too complex to be used in a practical manner for serious program development. Another shortcoming of these methodologies is that many methods for designing hardware (state machines, petri-nets, etc.) are used to design Ada software with no real modification. Since hardware and software production are fundamentally different, there is often an inconsistency between those methods used for hardware design and what is really needed for the design of quality Ada Software.
Many graphical design tools for Ada do produce source code from their representation. An example of such a tool is AdaGraph by The Analytic Sciences Corp. (TASC). However, many tools only generate the package specifications and not the subprogram bodies. Expressing the control flow of an individual subprogram is a key requirement for producing usuable source code. In addition, many of these tools do not support the design of key features of the Ada language such as tasking, rendevous, exception handling, and proper generation of code for Ada datatypes. Since these tools are used for design of Ada programs, the inability to represent key features of the Ada language is a serious impediment to program development with these tools. Furthermore, many of these tools produce code for a number of target languages (beside Ada) and are not optimized for the Ada language.
U.S. patents of interest include U.S. Pat. No. 4,536,840 to Borta, which discloses an automatic application program generator capable of being used with microcomputers. The patented device operates directly from information formatted onto the display screen of a computer and without program language or syntax input from the operator. Herbert et al in U.S. Pat. No. 4,546,435 describes a graphic system and computer keyboard which uses graphic symbols in the form of a flowchart. In U.S. Pat. No. 4,703,435 to Darringer et al. logic is synthesized from a flowchart level description. With a device described in U.S. Pat. No. 4,785,408 to Britton et al, the system designer uses a graphic terminal to select and interconnect modules to define the sequence of transactions needed to implement the desired voice service. Messerich et al in U.S. Pat. No. 4,742,467 are concerned with an automated method and apparatus used for creating data processing application programs in programmer oriented languages such as COBEL from individual programming language statements. The system of this patent also provides for interactive editing of the application program as it is being created at the terminal. Ashford et al in U.S. Pat. No. 4,763,277 describes a method for obtaining information in an expert system.